<template>
    <div class="teamplate-current">
        <div class="container-fluid">
            <div class="row h-query">
                
            </div>
            <div class="row">
                <div class="list-table">
                    <div class="list-h">
                        <div class="btn-group">
                            <span  @click="add"><i class="iconfont icon-jiahao"></i> 添加会员扣率</span>
                        </div>
                    </div>
                    <div class="table-wrap">
                        <div class="table-box ">
                            <table class="table table-striped tc add">
                                <thead >
                                    <tr>
                                        <th style="text-align:left;">货位名称</th>
                                        <th style="text-align:left;">商品编号</th>
                                        <th style="text-align:left;">通用名</th>
                                        <th style="text-align:left;">商品名称</th>
                                        <th style="text-align:left;">商品规格</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td style="text-align:left;">12</td>
                                        <td style="text-align:left;">34</td>
                                        <td style="text-align:left;">56</td>
                                        <td style="text-align:left;">78</td>
                                        <td style="text-align:left;">9</td>
                                     </tr>
                                </tbody>
                            </table>
                        </div>
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import bus from '../api/eventBus';
import {
    setUi,
    setUserCode,
    setPopStatus
} from '../vuex/actions'
import {
    ui,
    userCode,
    popStatus
} from '../vuex/getters'
export default {
    components: {},
    data() {
        return {
            v: 1686,
        }
    },
    watch: {

    },
    vuex: {
        getters: {
            ui,
            userCode,
            popStatus,
        },
        actions: {
            setUi,
            setUserCode,
            setPopStatus
        }
    },
    methods: {
        add(e){
           let me = this;
           me.add=`<tr >
            <td style="text-align:left;"><input type="text" style="border:none"/></td>
            <td style="text-align:left;"><input type="text" style="border:none"/></td>
            <td style="text-align:left;"><input type="text" style="border:none"/></td>
            <td style="text-align:left;"><input type="text" style="border:none"/></td>
            <td style="text-align:left;"><input type="text" style="border:none"/></td>
            </tr>`;
           $('.add').find('tbody').append(me.add);
        }
     
    },
    mounted() {
        let me = this;

     }
}
</script>
<style>
table td{word-break: keep-all;white-space:nowrap;}
</style>